package com.example.yuejian23.yuejian_23.service;

import com.example.yuejian23.yuejian_23.javaBean.FatieBean;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by dong on 2017/10/26.
 */
//http://localhost/new18yuejian/api.php/Post/ppost/uid/1/ptext/%E4%BB%8A%E5%A4%A9%E5%BF%83%E6%83%85%E5%BE%88%E5%A5%BD
public interface FatieService {
    @GET("Post/ppost")
    Call<FatieBean> fatie(@Query("uid")String uid,
                          @Query("ptext")String ptext);

    @Multipart
    @POST("Post/ppost")
    Call<ResponseBody> upload(
            @Query("uid")String uid,
            @Query("ptext")String ptext,
            @Part MultipartBody.Part file
    );
}


